<admintpl file="header" />


<link href="__TMPL__Public/assets/css/infomation.css" rel="stylesheet" />
</head>
<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:U('EquipmentReview/index')}">设备款审批报审表管理</a></li>
            <if condition="($Role eq 2) AND ($userrole['role'] eq 5)">
            <li><a href="{:U('EquipmentReview/add')}">新增设备款审批报审</a></li>
            </if>
            <li class="active"><a href="{:U('EquipmentReview/view', array('id'=>I('request.id/s','')))}">查看设备款审批报审</a></li>
        </ul>
        <section class="tab-pane active fade in" id="access">
            <div class="row">
                <div class="col-xs-12 col-md-12 col-lg-12">
                    <div class="panel panel-info">
                        <div class="panel-body">
                            <form method="post" class="form-horizontal " action="{:U('EquipmentReview/audit_post')}">
                                <input type="hidden" name="audit_level" value="2" >
                                <input type="hidden" name="table_id" value="{$result.id}" />
                                <input type="hidden" name="audit_level" value="{$result.audit_level}" />
                                <div class="row tg-header">
                                    <div class="col-md-12 text-center">
                                        <h3>设备款报审表</h3>
                                        <hr />
                                    </div>
                                    <div class="col-md-12">
                                        <p class="tg-to"><label>工程名称:</label><input type="text" class="input-xt input-deptname" value="{$job_name}" readonly/></p>
                                        <p class="pull-right tg-serialnum"><label>编号:</label><input class="input-xt" name="code" value="{$result.code}" required /></p>
                                    </div>
                                </div>

                                <table class="table table-bordered">
                                    <tr>
                                        <td style="border-right:none !important;">
                                            <p>
                                                <label>致：<input type="text" class="input-xt input-deptname"  name="supervisory_department" value="浙江泛华工程监理有限公司" readonly/>（项目监理机构）:</label>
                                            </p>
                                            <p class="indent20">
                                                我方已完成<input type="text" class="input-xt input-longname" name="job_content"  value="{$result.job_content}" required/>工作，该本月工程量清单计价为：<input type="text" class="input-xt input-yuan" name="list_pricing" value="{$result.list_pricing}" required/>元。按施工合同约定，扣除预付款的10%为<input type="text" class="input-xt input-yuan" name="deducts_prepayment" value="{$result.deducts_prepayment}" required/>，建设单位应支付该工程款的75%即<input type="text" class="input-xt input-yuan" name="payables" value="{$result.payables}" required/>元（大写）<input type="text" class="input-xt input-deptname" name="amount_in_words" value="{$result.amount_in_words}" required/>，现将有关资料报上，请予以审核。
                                            </p>
                                            <p></p>
                                            <p class="indent20">
                                                附件
                                            <ol>
                                                <if condition="$result['audit_level'] eq 1">
                                                    <li>
                                                        <span style="width:200px !important;">中标通知书</span>
                                                        <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_1" style="padding: 6px;margin-left:15px; margin-bottom: 15px; line-height: 0.7em;">上传</a>
                                                        <span class="controls" style="margin-left:10px;">   
                                                            <input type="hidden" name="attachment_1" value="{$result.attachment_1_name}">    
                                                            <input type="hidden" name="attachment_1" value="{$result.attachment_1_name}">    
                                                            {$result.attachment_1_name}
                                                        </span>
                                                    </li>
                                                    <li>
                                                        <span style="width:200px !important;">合同复印件</span>
                                                        <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachment_2" style="padding: 6px;margin-left:15px; margin-bottom: 15px;line-height: 0.7em;">上传</a>
                                                        <span class="controls" style="margin-left:10px;">   
                                                            <input type="hidden" name="attachment_2" value="{$result.attachment_2}">    
                                                            <input type="hidden" name="attachment_2_name" value="{$result.attachment_2_name}">    
                                                            {$result.attachment_2_name}
                                                        </span>
                                                    </li>
                                                    <li>
                                                        <span style="width:200px !important;">市本级财政拨付资金申请表</span>
                                                        <a href="javascript:void(0);" class="btn upBtn btn-primary" name="attachement_3" style="padding: 6px;margin-left:15px; margin-bottom: 15px;line-height: 0.7em;">上传</a>
                                                        <span class="controls" style="margin-left:10px;">   
                                                            <input type="hidden" name="attachement_3" value="{$result.attachement_3_name}">    
                                                            <input type="hidden" name="attachement_3" value="{$result.attachement_3_name}">    
                                                            {$result.attachement_3_name}
                                                        </span>
                                                    </li>
                                                    <else />
                                                    <li>中标通知书<br />
                                                        <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_1}" name="{$result.attachment_1_name}">{$result.attachment_1_name}</a>
                                                    </li>
                                                    <li>合同复印件<br />
                                                        <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_2}" name="{$result.attachment_2_name}">{$result.attachment_2_name}</a>
                                                    </li>
                                                    <li>市本级财政拨付资金申请表<br />
                                                        <a href="javascript:void(0);" class="fileDownload" path="{$result.attachment_3}" name="{$result.attachment_3_name}">{$result.attachment_3_name}</a>
                                                    </li>
                                                </if>
                                            </ol>
                                            </p>
                                            <div class="signature">
                                                <p>
                                                    承包单位（盖章）
                                                </p>
                                                <p>
                                                    项目经理（签字)
                                                </p>
                                            </div>
                                            <p class="signature-date">
                                                <span>{$result.publish_time|substr=0,4}年</span>
                                                <span>{$result.publish_time|substr=5,2}月</span>
                                                <span>{$result.publish_time|substr=8,2}日</span>
                                            </p>         
                                        </td>
                                    </tr>
                                    </tr>
                                    <if condition="($audit[3] OR $isAudit eq '2') AND $result['audit_level'] egt 3">
                                    <tr>
                                        <td colspan="4">
                                            监理单位审核意见:
                                            <p class="indent20"> 
                                                本期同意支付工程款为：（小写）<input type="text" class="input-xt input-name"  name="supervision_amount" value="{$result.supervision_amount}" required <if condition="$result['supervision_amount'] neq ''">readonly</if> />，（大写）<input type="text" class="input-xt input-name"  name="supervision_amount_words" required value="{$result.supervision_amount_words}" <if condition="$result['supervision_amount_words'] neq ''">readonly</if>/>请代建单位审批。
                                            </p>
                                            <div class="signature">
                                                <p>监理单位（章）</p>
                                                <p>专业监理工程师(签字)</p>
                                                <p>总监理工程师</p>
                                            </div>
                                            <p class="signature-date">
                                                <span>年</span>
                                                <span>月</span>
                                                <span>日</span>
                                            </p>   
                                        </td>
                                    </tr>
                                    </if>
                                    <if condition="($audit[5] OR $isAudit eq '2') AND $result['audit_level'] egt 5">
                                    <tr>
                                        <td colspan="4">
                                            代建单位审核意见:
                                            <p class="indent20"> 
                                                本期同意支付工程款为：（小写）<input type="text" class="input-xt input-name"  name="agent_construction_amount" required <if condition="$result['agent_construction_amount'] neq ''">readonly</if>  value="{$result.agent_construction_amount}" />，（大写）<input type="text" class="input-xt input-name"  name="agent_construction_amount_words" required <if condition="$result['agent_construction_amount_words'] neq ''">readonly</if> value="{$result.agent_construction_amount_words}" />请建设单位审批。
                                            </p>
                                            <div class="signature">
                                                <p>代建单位（章）</p>
                                                <p>代建负责人(签章)</p>
                                            </div>
                                            <p class="signature-date">
                                                <span>年</span>
                                                <span>月</span>
                                                <span>日</span>
                                            </p> 
                                            
                                        </td>
                                    </tr>
                                    </if>
                                    <if condition="($audit[7] OR $isAudit eq '2') AND $result['audit_level'] egt 7">
                                   <tr>
                                        <td colspan="4">
                                            审批意见:
                                            <p class="indent20"> 
                                                本期同意支付工程款为：（小写）<input type="text" class="input-xt input-name" required name="construction_amount" value="{$result.construction_amount}" <if condition="$result['construction_amount'] neq ''">readonly</if> />，（大写）<input type="text" class="input-xt input-deptname"  name="construction_amount_words" required value="{$result.construction_amount_words}" <if condition="$result['construction_amount_words'] neq ''">readonly</if> />。
                                            </p>
                                            <div class="signature">
                                                <p>建设单位（盖章）</p>
                                                <p>经办人（签字）</p>
                                                <p>建设单位代表（签字）</p>
                                            </div>
                                            <p class="signature-date">
                                                <span>年</span>
                                                <span>月</span>
                                                <span>日</span>
                                            </p> 
                                        </td>
                                    </tr>
                                    </if>
                                    <if condition="$isAudit eq '2'">
                                        <tr>
                                            <td colspan="4">
                                                <label>审查意见：
                                                    <label style="width:50px;"><input type="radio" name="audit_status" value="1" checked />&nbsp;同意</label>
                                                    <label style="width:50px;"><input type="radio" name="audit_status" value="2" />&nbsp;驳回</label>
                                                </label>
                                                <textarea style="height:50px; width:100%" name="audit_reason" >{$audit.audit_reason}</textarea>
                                            </td>
                                        </tr>
                                    </if>
                                </table>
                                <if condition="$result['audit_level'] eq 1">
                                    <input type="hidden" name="audit_status" value="1" />
                                    <input type="hidden" name="audit_reason" value="变更保存" />
                                </if>
                                <div class="form-actions">
                                    <if condition="$isAudit eq '2'">
                                        <a class="btn btn-primary clickBtn" href="javascript:void(0);">{:L('SAVE')}</a>
                                    </if>
                                    <if condition="$result['audit_status'] eq 3">
                                        <a class="btn btn-warning" href="javascript:$.print('#access');">打印</a>
                                    </if>
                                    <a class="btn btn-default" href="{:U('EquipmentReview/index')}">{:L('BACK')}</a>
                                </div>
                            </form>                   
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </div>
    <script src="__PUBLIC__/js/common.js"></script>
    <script type="text/javascript">
        // 点击保存按钮
        $(".clickBtn").click(function(){
            $(".tips_error").remove();
            var audit_status = $("input[name='audit_status']:checked").val();
            var audit_reason = $("textarea[name='audit_reason']").val();
            if(audit_status == '2' && audit_reason == ""){
                $(".form-actions").append("<span class=\"tips_error\">驳回意见不允许为空！</span>");
                $("textarea[name='audit_reason']").focus()
                return false;
            }
            
            // 表单提交
            $("form").submit();
        });
        $("input[name='supervision_amount']").blur(function(){
            $(this).value(convertCurrency($(this).val()));
        });
        
    </script>
</body>
</html>